package system

import (
	v2 "gin-admin/handler/v2"
	"gin-admin/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterRoleRoutes(group *gin.RouterGroup) {
	roleGroup := group.Group("/role")
	handlerApp := v2.NewHandlerApp()
	roleGroup.Use(middleware.AuthorizationMiddleware())
	{
		roleGroup.POST("/create", handlerApp.RoleHandler.CreateRoleInfoHandler)
		roleGroup.DELETE("/delete/:id", handlerApp.RoleHandler.DeleteRoleInfoHandler)
		roleGroup.PUT("/modify", handlerApp.RoleHandler.ModifyRoleInfoHandler)
		roleGroup.GET("/info/:id", handlerApp.RoleHandler.GetRoleInfoHandler)
		roleGroup.GET("/list", handlerApp.RoleHandler.GetRoleListHandler)
		roleGroup.GET("/page", handlerApp.RoleHandler.GetRolePageHandler)
	}
}
